package com.un.ebs.sys.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.un.ebs.core.enums.PageTypeEnum;
import com.un.ebs.core.metadata.DbField;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

/**
 * (Page)表实体类
 *
 * @author liubo
 * @since 2020-12-30 09:18:06
 */
@Data
@Component
@TableName("sys_page")
@SuppressWarnings("serial")
public class Page extends Model<Page> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "class_id", length = 40, precision = 0)
    private String classId;

    @DbField(name = "page_type", length = -1, precision = 0)
    private PageTypeEnum pageType;

    @DbField(name = "title", length = 100, precision = 0)
    private String title;

    @DbField(name = "remark", length = 200, precision = 0)
    private String remark;

    @DbField(name = "config_json", length = -1, precision = 0)
    private String configJson;

    private String runJson;

    @DbField(name = "render_engine_ver", length = 10, precision = 0)
    private String renderEngineVer;

    private Boolean allowAnonymous;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at", length = 40, precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at_name", length = 100, precision = 0)
    private String createAtName;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_at", length = 40, precision = 0)
    private String lastModifiedAt;

    @DbField(name = "last_modified_at_name", length = 100, precision = 0)
    private String lastModifiedAtName;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_time", length = -1, precision = 0)
    private Date lastModifiedTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}